import { defineStore } from "pinia";
import type { ReportDataModel } from "@/api/data/model";
import { reportDataApi } from "@/api/data";

interface dataStoreType {
  reportData: ReportDataModel;
}

const useDataStore = defineStore("data", {
  state: (): dataStoreType => {
    return {
      reportData: {},
    };
  },
  getters: {},
  actions: {
    async getData() {
      const result = await reportDataApi();
      this.reportData=result
    }
  },
});

export default useDataStore;
